<?php
include('class/user.php');
include('class/dbmodifier.php');
include('class/country.php');
include('class/role.php');
include('class/job.php');
include('class/quark.php');
include('class/ressourcetype.php');
include('class/ressourceext.php');
include('class/jobsolution.php');
include('class/function.php');
include('class/quarktransmitted.php');

$qid = $_GET['qid'];
$jid = $_GET['jid'];
$refer = $_GET['refer'];

$quark = quark::getQuarkById($qid);
$currentSolution = jobsolution::getJobSolutionByJobId($quark->getJob()->getId());
$imgPath = $quark->getPathToRessource();
?>
<link rel="stylesheet" type="text/css" href="css/quarkview.css" />
<form id="" action="" method="post">
<div id="container">           
	<div id="quarkContainer">
    	<table>
        	<tr>
            	<td rowspan="2" id="quarkRessource" ><img src="<?php echo $imgPath;?>"/></td>
            	<td style="vertical-align:top; width:100%;">
                		<div id="quarkQuestion">
							<?php echo $quark->getJob()->getDescription();?>
                        </div>
                </td>
            </tr>
            <tr>    
                <td id="quarkSolution">
                	<?php while($row = $currentSolution->fetch_assoc()){
							$temp = new jobsolution($row['id'],$row['job_id'],$row['name'],$row['value']);
							echo "<input type=\"radio\" name=\"solution\"".
							"value=\"".$temp->getValue()."\"> ".$temp->getName()."<br>";	
					}?>
                </td>
             </tr>
             <tr>
             	<td>&nbsp;</td>
                <td id="quarkSubmit"><img src="images/submit-quark.png"></td>
         </table>
    </div>
    	<table>
        	<tr>
            	<!--<td><img src="images/accept-quark.png"></td>
                <td style="text-align:right;"><img src="images/next-quark.png"></td>-->
			</tr>
        </table>    
</div>
</form>
<img src="images/back.png" onclick="javascript:window.location = '<?php echo $refer;?>.php?jid=<?php echo $jid;?>'" />

